{#
This file is part of EC-CUBE

Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.

http://www.ec-cube.co.jp/

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
#}

{% extends 'default_frame.twig' %}

{% set menus = ['setting', 'system', 'log'] %}

{% block title %}システム設定{% endblock %}
{% block sub_title %}EC-CUBE ログ表示{% endblock %}

{% block main %}
    <div class="row">
        <div class="col-md-12">
            <div id="log_box" class="box">
                <div id="log_box__header" class="box-header">
                    <h3 class="box-title">EC-CUBE ログ表示</h3>
                </div><!-- /.box-header -->

                <div id="log_box__body" class="box-body">
                    <div id="log_conditions_box">
                        <form name="form1" id="form1" method="post">
                            {{ form_widget(form._token) }}
                            <div id="log_conditions_box__body" class="form-inline form-group">
                                <div  id="log_conditions_box__files" class="form-group">
                                    {{ form_widget(form.files, {'attr': {'class': 'form-control'}}) }}
                                </div>
                                <div id="log_conditions_box__line_max" class="form-group">
                                    直近の{{ form_widget(form.line_max, {'id': 'line-max', 'attr': {'class': 'form-control'}}) }}行を
                                </div>
                                <div id="log_conditions_box__confirm_button" class="form-group">
                                    <button type="submit" class="btn btn-default">読み込む</button>
                                </div>
                                {{ form_errors(form.line_max) }}
                            </div>
                            <div class="extra-form clearfix">
                                {% for f in form.getIterator %}
                                    {% if f.vars.name matches '[^plg*]' %}
                                        <div class="form-group">
                                            {{ form_label(f) }}
                                            {{ form_widget(f) }}
                                            {{ form_errors(f) }}
                                        </div>
                                    {% endif %}
                                {% endfor %}
                            </div>
                        </form>
                    </div>
                    <div id="log_view">
<textarea id="log" class="form-control" rows="20"  wrap="off" readonly>
{% for line in log %}
{{ line }}
{% endfor %}
</textarea>
                    </div>
                </div><!-- /.box-body -->
            </div><!-- /.box -->
        </div>
    </div>
{% endblock %}
